﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PageUnloadNotifier
{
    public partial class PageUnloadNotifier : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        	public string Message
		{
			get
			{
				if (ViewState["Message"] == null)
					return String.Empty;

				return (string) ViewState["Message"];
			}
			set
			{
				ViewState["Message"] = value;
			}
		}


		/// <summary>
		/// Gets or sets the name of the unload function.
		/// </summary>
		/// <value>The name of the unload function.</value>
		public string UnloadFunctionName
		{
			get
			{
				if (ViewState["UnloadFunctionName"] == null)
					return String.Empty;

				return (string)ViewState["UnloadFunctionName"];
			}
			set
			{
				ViewState["UnloadFunctionName"] = value;
			}
		}



		/// <summary>
		/// Gets the enable page unload notifier function.
		/// </summary>
		/// <value>The enable page unload notifier function.</value>
		public string EnablePageUnloadNotifierFunction
		{
			get
			{
				return "EnablePageUnloadNotifier()";
			}
		}



		/// <summary>
		/// Gets the disable page unload notifier function.
		/// </summary>
		/// <value>The disable page unload notifier function.</value>
        public string DisablePageUnloadNotifierFunction
        {
            get
            {
                return "DisablePageUnloadNotifier()";
            }
        }
    }
}